import EventEmitter from 'events';
class MyEmitter extends EventEmitter {
  static _instance: any;
  constructor() {
    super();
    if (new.target !== MyEmitter) {
      return;
    }
    if (!MyEmitter._instance) {
      MyEmitter._instance = this;
    }
    return MyEmitter._instance;
  }
}

export default new MyEmitter();
